<template>
	<view class="hotNews">
		 <view class="hotNews-main" v-for="item in textlist" :key="item.id">
				<view class="hotNews-title">{{item.title}}</view>
				<view class="hotNews-author">{{item.author}}</view>
				<view class="hotNews-time">{{item.time}}</view>
				<view class="" v-html="item.text"></view>
		 </view>
	</view>
</template>

<script>
	import { $_getarticleinfo} from "@/apis/index.js"
	import { ChangeTime } from "@/utils/time/ChangeTime.js"
	export default {
		data() {
			return {
				textlist:{},
				// author:"合肥飞墨设计"
				// id:1
				// imgs:"/article/article_1.jpg"
				// point:"1188"
				// text:"置不宜太远，否则排油烟时管道太长，排油烟效果不好。"
				// time:"2022-09-21T08:17:58.000Z"
				// title:"我妈说：“最满意你家厨房！”"
				text:{}
			};
		},
		async onLoad(option) {
			let _this=this 
			_this.text=JSON.parse(option.item) 
			let res=await $_getarticleinfo({id:_this.text.id})
			for (let item of res.data.data) {
				item.time=ChangeTime(item.time)
			} 
			_this.textlist=res.data.data
			// console.log(35,_this.textlist);
			uni.setNavigationBarTitle({
				title: res.data.data[0].title
			});
		}
	}
</script>

<style lang="scss">
.big-image{
	width: 100%;
	height:100%;
}
.hotNews-main{
	margin: 10px;
	.hotNews-author{
		font-weight: bold;
	}
	.hotNews-title{
		font-weight: bold;
		font-size: 20px;
	}
	.hotNews-time{
		font-size: 12px;
		color: #999;
	}
}

</style>
